<?xml version='1.0' encoding='ISO-8859-1' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"   
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:p="http://primefaces.org/ui"
      xmlns:composite="http://java.sun.com/jsf/composite">

    <h:head>
        <f:loadBundle basename="com.brain.core.i18n.ApplicationResources" var="message" />
        <title><h:outputText value="#{message['general.cabecera.titulo.aplicacion']}"/></title>            
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/recursos/css/default.css" />
        <link type="text/css" rel="stylesheet" href="#{request.contextPath}/recursos/css/theme.css" />
        <script type="text/javascript" src="#{request.contextPath}/recursos/js/script.js" /> 
    </h:head>

    <composite:interface>    

    </composite:interface>

    <composite:implementation>   
        <h:form onsubmit="return checkSubmit();"  id="form" prependId="false">
            <p:messages id="msgs2" showDetail="false"/>
            <h:panelGrid columns="4" id="idPgrUbigeo">
                
                <h:outputLabel styleClass="label" value="#{ubigeoMBean.dto.ubigeoPadreDto.tipo}"/>  
                <h:outputLabel styleClass="label" value="#{ubigeoMBean.dto.ubigeoPadreDto.descripcion}" />                
                <p:spacer/>
                <p:spacer/>
                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.tipo']}"/>
                <h:outputLabel styleClass="label" value="#{ubigeoMBean.dto.tipo}" /> 
                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.descripcion']}"/>
                <p:inputText label="#{i18n['ubigeo.descripcion']}" required="true"
                             value="#{ubigeoMBean.dto.descripcion}"  readonly="#{sessionMBean.accion == 3}"
                             size="40" styleClass="txtCampoObligatorio">
                    <f:validateLength maximum="100" minimum="2" />
                </p:inputText>
                
                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.codigo.postal']}"/>
                <p:inputText label="#{i18n['ubigeo.codigo.postal']}" required="false"
                             value="#{ubigeoMBean.dto.codigoPostal}"  readonly="#{sessionMBean.accion == 3}"
                             size="10" style="#{applicationMBean.estiloObligatorio}">
                    <f:validateLength maximum="10" minimum="0" />
                </p:inputText>

                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.codigo.inei']}"/>
                <p:inputText label="#{i18n['ubigeo.codigo_inei']}" required="false"
                             value="#{ubigeoMBean.dto.codigoInei}"  readonly="#{sessionMBean.accion == 3}"
                             size="10" style="#{applicationMBean.estiloObligatorio}">
                    <f:validateLength maximum="30" minimum="0" />
                </p:inputText>
                
                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.codigo.sunat']}"/>
                <p:inputText label="#{i18n['ubigeo.codigo.sunat']}" required="false"
                             value="#{ubigeoMBean.dto.codigoSunat}"  readonly="#{sessionMBean.accion == 3}"
                             size="10" style="#{applicationMBean.estiloObligatorio}">
                    <f:validateLength maximum="30" minimum="0" />
                </p:inputText>

                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.derechos']}" rendered="#{ubigeoMBean.dto.tipo=='PAIS'}"/>
                <p:inputText  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}" label="#{i18n['ubigeo.derechos']}" onkeypress="return fn_validaTecla('decimal',this)" 
                              value="#{ubigeoMBean.dto.derechos}"  readonly="#{sessionMBean.accion == 3}"
                              size="10" styleClass="txtCampoObligatorio">                    
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />                 
                </p:inputText>

                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.impuesto.ventas']}"  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}"/>
                <p:inputText  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}" label="#{i18n['ubigeo.impuesto.ventas']}" onkeypress="return fn_validaTecla('decimal',this)"
                              value="#{ubigeoMBean.dto.impuestoVentas}"  readonly="#{sessionMBean.accion == 3}"
                              size="10" styleClass="txtCampoObligatorio">                    
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />              
                </p:inputText>

                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.retencion']}"  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}"/>
                <p:inputText  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}" label="#{i18n['ubigeo.retencion']}" onkeypress="return fn_validaTecla('decimal',this)"
                              value="#{ubigeoMBean.dto.retencion}"  readonly="#{sessionMBean.accion == 3}"
                              size="10" styleClass="txtCampoObligatorio">                                                       
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
                </p:inputText>
                
                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.retencion.honorarios']}"  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}"/>
                <p:inputText  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}" label="#{i18n['ubigeo.retencion.honorarios']}" onkeypress="return fn_validaTecla('decimal',this)"
                              value="#{ubigeoMBean.dto.retencionHonorarios}"  readonly="#{sessionMBean.accion == 3}"
                              size="10" styleClass="txtCampoObligatorio">                                                       
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
                </p:inputText>

                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.percepcion']}"  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}"/>
                <p:inputText  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}" label="#{i18n['ubigeo.percepcion']}" onkeypress="return fn_validaTecla('decimal',this)"
                              value="#{ubigeoMBean.dto.percepcion}"  readonly="#{sessionMBean.accion == 3}"
                              size="10" styleClass="txtCampoObligatorio">                                                       
                    <f:convertNumber pattern="#{applicationMBean.formatoMontos}" />
                </p:inputText>
                
                <h:outputLabel styleClass="label" value="#{i18n['ubigeo.prioridad']}"  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}"/>
                <p:inputText  rendered="#{ubigeoMBean.dto.tipo=='PAIS'}" label="#{i18n['ubigeo.prioridad']}" onkeypress="return fn_validaTecla('decimal',this)"
                              value="#{ubigeoMBean.dto.prioridad}"  readonly="#{sessionMBean.accion == 3}"
                              size="10" style="#{applicationMBean.estiloObligatorio}">                    
                    <f:validateLength maximum="2" minimum="0" />                    
                </p:inputText>
            </h:panelGrid>
            <p:panel id="pnlAcciones">
                <h:panelGrid columns="10">
                    <p:commandButton title="#{i18n['general.button.guardar.tip']}" accesskey="#{applicationMBean.keyGuardar}" ajax="true" onsuccess=":idDlgUbigeo.hide()"
                                     icon="ui-icon ui-icon-disk" update="msgs2" disabled="#{ubigeoMBean.validarBotonGuardar}"                         
                                     value="#{i18n['general.button.guardar']}"
                                     style="#{applicationMBean.estilosBtnGuardar}"
                                     actionListener="#{ubigeoMBean.guardar}">                
                    </p:commandButton>
                    <p:commandButton title="#{i18n['bitacora.ver.historial']}"
                                         icon="ui-icon ui-icon-calculator"
                                         value="#{i18n['bitacora.ver.historial']}"                                                                                                           
                                         ajax="true"
                                         style="#{applicationMBean.estilosBtnHistorial}"
                                         oncomplete="dlgBitacoraEntidad.show()"                                                       
                                         update=":frmPopupBitacoras:pgFormPopupBitacoras"
                                         actionListener="#{ubigeoMBean.verBitacora}">                                    
                     </p:commandButton> 
                </h:panelGrid>

            </p:panel>
        </h:form>
    </composite:implementation>

</html>